﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="hcrain.ico">
    <link rel="Shortcut Icon" href="hcrain.ico" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="css/H-ui.login.css" rel="stylesheet" type="text/css" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>追雨潮开发框架 HC-DV-V1.0</title>
    <meta name="keywords" content="追雨潮框架 HCRain  权限管理系统  工作流引擎，表单引擎 ，免费，简单  基于 C#  html easyui .net mysql h-ui mvc">
    <meta name="description" content="追雨潮框架 HCRain  权限管理系统  工作流引擎，表单引擎 ，免费，简单  基于 C#  html easyui .net mysql h-ui mvc">
</head>
<body>
    <input type="hidden" id="TenantId" name="TenantId" value="" />
    <div class="header">追雨潮 开发框架 案例展示</div>

    <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
    <script src="hcjsui/jquery-easyui-1.3.3/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="hcjsui/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js" charset="utf-8" type="text/javascript"></script>
    <script src="hcjsui/Scripts/jquery.form.js" type="text/javascript"></script>
    <script src="hcjsui/js/_Define.js" type="text/javascript"></script>
    <script src="hcjsui/js/easyui-extend/form.js" type="text/javascript"></script>

    <script type="text/javascript" src="js/H-ui.js"></script>
    <script type="text/javascript">
      

        //cookie
        function hcsetCookie(cname, cvalue, exdays) {
            var d = new Date();
            d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
            var expires = "expires=" + d.toUTCString();
            document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/";;
        }

        //清除cookie  
        function hcclearCookie(name) {
            hcsetCookie(name, "", -1);
        }

      
        function login() {
            $.get("http://localhost:4393/api/Users/GetUsers",{
               
           },
           function (data, status, jqxhr) {
               alert('保存成功'); Console.log(data); Console.log(status);
           }).fail(function (e) {
               alert('保存失败'); Console.log(e);
           });

           


          
            $("#loginformpost").ajaxSubmit({
                success: function (message) {
                    var data = JSON.parse(message);
                    if (data.message == JsonResult.Success) {
                        window.location.href = "index.aspx";
                    }
                    else {
                        alert("登录失败" + data.data + "，可以在下面点击还原数据库。");
                        //$.messager.alert("提示信息", "请选择需要修改的数据！");

                    }
                }
            });

        }
        function dodbinfo(type) {
            $.get("ashx/user_loginout.ashx?action=" + type + "&time=" + new Date().getTime() + "&user=" + $("#lusername").val(),
                  function (data) {
                      var data = JSON.parse(data);
                      alert(data.data);
                  });
        }
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }
        $(function () {
            hcclearCookie("HCUid");
            var autologin = getUrlParam("autol");

            if (autologin && autologin == "true" && getUrlParam("id")) {


                $("#lusername").val(getUrlParam("id"));
                $("#luserpass").val(getUrlParam("id"));
                login();
            }
            var bp = document.createElement('script');
            bp.src = '//push.zhanzhang.baidu.com/push.js';
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
            //if (autologin) login();
        });
    </script>
    <div class="loginWraper">
        <div id="loginform" class="loginBox">
            <form id="loginformpost" class="form form-horizontal" action="ashx/user_loginout.ashx?action=login" method="post">
                <div class="row cl">
                    <label class="form-label col-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                    <div class="formControls col-8">
                        <input id="lusername" name="lusername" type="text" placeholder="账户" value="hui" class="input-text size-L">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                    <div class="formControls col-8">
                        <input id="luserpass" name="luserpass" type="password" placeholder="密码" value="hui" class="input-text size-L">
                    </div>
                </div>
                <!--<div class="row cl">
        <div class="formControls col-8 col-offset-3">
          <input class="input-text size-L" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:150px;">
          <img src="images/VerifyCode.aspx.png"> <a id="kanbuq" href="javascript:;">看不清，换一张</a> </div>
      </div>-->
                <div class="row">
                    <div class="formControls col-8 col-offset-3">
                        <label for="online">
                            Hui风格使用账号:hui/hui<br />
                            Easyui风格使用账号:easyui/easyui
                        <!--    <input type="checkbox" name="online" id="online" value="">
                            使我保持登录状态-->
                        </label>
                    </div>
                </div>
                <div class="row">
                    <div class="formControls col-8 col-offset-3">
                        <input name="" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;" onclick="javascript: login();">
                        <input name="" type="reset" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
                        <br />
                        <a href="hcrain.html" class="dropDown_A" style="color: yellow;">返回Home </a>&nbsp;&nbsp;
                           &nbsp; <a href="#" class="dropDown_A" style="color: yellow;" onclick="dodbinfo('savedb')">备份DB </a>
                        &nbsp;<a href="#" class="dropDown_A" style="color: yellow;" onclick="dodbinfo('backdb')">还原DB </a>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="footer">Copyright 追雨潮  HCRain QQ262300093  （感谢H-ui 及相关开源插件）</div>

    <script  type="text/javascript">
        $("#luserpass").keydown(function (event) {
            if (event.which == "13")
                login();
        });
    </script>
</body>
</html>
